﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WIKID.Controller
{
    class QuestionController
    {
        public int CompareQuestionByID(QuestionModel y, QuestionModel x)
        {
            if (x == null)
            {
                if (y == null)
                {
                    // If x is null and y is null, they're
                    // equal. 
                    return 0;
                }
                else
                {
                    // If x is null and y is not null, y
                    // is greater. 
                    return -1;
                }
            }
            else
            {
                // If x is not null...
                //
                if (y == null)
                // ...and y is null, x is greater.
                {
                    return 1;
                }
                else
                {
                    int a = Convert.ToInt32(x.ID);
                    int b = Convert.ToInt32(y.ID);
                    return(a.CompareTo(b));
                }   
            }
        }

        public Boolean CheckTheAnswer(String x, String y )
        {
            return x.Equals(y);
        }
    }
}
